import { reactive } from "vue";

interface Form {
    projectName:string;
    moduleName:string;
    invalidTime:string;
    appKey:string;
}
export const ruleForm = reactive<Form>({
    projectName: '',
    moduleName: '',
    invalidTime: '',
    appKey: ''
})


interface Rules {
    name:{
        required:boolean,
        message:string,
        trigger:string | string[]
    }[];
    ip:{
        required:boolean,
        message:string,
        trigger:string | string[]
    }[];
    address:{
        required:boolean,
        message:string,
        trigger:string | string[]
    }[];
}

export const rules = reactive<Rules>({
    name: [
        { required: true, message: '姓名不能为空', trigger: ['blur'] }
      ],
      ip: [
        { required:true, message: 'ip不能为空', trigger: ['blur'] }
      ],
      address: [
        { required: true, message: '地址不能为空', trigger: ['blur'] }
      ]
})



